import { createI18n } from "vue-i18n";
import zh from "./zh.json"
import en from "./en.json"
import { getItem } from "@/utils/utils.ts";

let locale: string = "zh"
if (getItem("lang") && getItem("lang") == "zh") {
    locale = "zh"
} else if (getItem("lang") && getItem("lang") == "en") {
    locale = "en"
} else {

}
const i18n = createI18n({
    locale,
    messages: {
        zh: zh,
        en: en,
    }
})

export default i18n;